<template>
  <div class="wrapper">
    <h3>人气推荐</h3>
    <div class="recommend">
      <div class="box" v-for="item in gorecommend" :key="item.id">
        <img :src="item.list_pic_url" alt />
        <ul>
          <li>{{item.name}}</li>
          <li>{{item.goods_brief}}</li>
          <li>{{item.retail_price | componentFilter}}</li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["gorecommend"]
};
</script>

<style lang="less" scoped>
.wrapper {
  background-color: #fff;
  padding: 10px;
  flex-direction: column;
  h3 {
    font-weight: normal;
    text-align: center;
    padding: 10px;
    margin: 0;
    border-bottom: 1px solid #ccc;
    border: none;
  }
}
.recommend {
  padding-top: 0;
  display: flex;
  flex-wrap: wrap;
  .box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f4f4f4;
    margin-top: 10px;
    border-bottom: 1px solid #ccc;
    img {
      width: 30%;
      margin-left: 10px;
    }
    ul {
      width: 60%;
      li {
        margin-bottom: 10px;
      }
      li:nth-of-type(1) {
        color: #323233;
      }
      li:nth-of-type(2) {
        color: #646566;
        font-size: 12px;
      }
      li:nth-of-type(3) {
        color: darkred;
      }
    }
  }
}
</style>